﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace VisitorPattern.Sample
{
    public class VisitorClient
    {
        public void Start()
        {
            ObjectStructure objectStructure = new ObjectStructure();
            foreach(Element e in objectStructure.Elements)
            {
                // 每个元素接受访问者访问
                e.Accept(new ConcreteVistor());
            }

            Console.Read();
        }
    }
}
